package com.tsd.base.dao;

import com.tsd.base.entity.BaseUnitConvertor;
import com.tsd.base.entity.BaseUnitConvertorExt;
import com.tsd.core.vo.PageBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 描述：BaseUnitConvertorMapper
 *
 * @author david
 * @date 2024/02/19 14:01:08
 */
public interface BaseUnitConvertorMapper {

    BaseUnitConvertor selectByPrimaryKey(Long id);

    BaseUnitConvertorExt selectBySid(String sid);

    int deleteByPrimaryKey(Long id);

    int insert(BaseUnitConvertor record);

    int insertSelective(BaseUnitConvertor record);

    int insertList(List<BaseUnitConvertor> list);

    int updateByPrimaryKey(BaseUnitConvertor record);

    int updateByPrimaryKeySelective(BaseUnitConvertor record);

    List<BaseUnitConvertorExt> selectByEntity(BaseUnitConvertor record);

    List<BaseUnitConvertorExt> selectByPage(@Param("params") Map<String, Object> params, @Param("page") PageBean page);

    List<BaseUnitConvertorExt> selectCount1Page(@Param("params") Map<String, Object> params, @Param("page") PageBean page);

    List<BaseUnitConvertorExt> selectByParams(@Param("params") Map<String, Object> params);
    //批量插入，mysql默认接受sql的大小是1048576(1M)，此方式若数据量超过1M会报如下异常：（可通过调整MySQL安装目录下的my.ini文件中[mysqld]段的＂max_allowed_packet = 1M＂）
    //void insertList(List<BaseUnitConvertor> list);
}